package com.starlink.model.util;

import com.starlink.model.dtomapper.PointsUseBillDtoMapper;
import com.starlink.model.domain.PointsUseBillDO;
import com.starlink.model.vo.PointsUseBillVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class PointsUseBillConvert {

    public static List<PointsUseBillVO> buildPointsUseBillVoList(List<PointsUseBillDO> pointsUseBillDOList) {
        if (CollectionUtils.isEmpty(pointsUseBillDOList)) {
            return Lists.newArrayList();
        }
        List<PointsUseBillVO> pointsUseBillVOList = new ArrayList<>();
        for (PointsUseBillDO pointsUseBillDO : pointsUseBillDOList) {
            pointsUseBillVOList.add(PointsUseBillDtoMapper.INSTANCE.do2VO(pointsUseBillDO));
        }

        return pointsUseBillVOList;
    }
}
